1. Field of the Invention
The present invention relates to a sound data decoder decoding digitally compressed sound data.
2. Description of the Background Art
In digital satellite broadcasting, DVDs (Digital Video Disks), and U.S. ATV (Advanced Television), sound data digitalized by Pulse Code Modulation (hereinafter referred to as "PCM", the sound data digitalized by the PCM is called "PCM data") is digitally compressed, for transmitting or recording, by using techniques based on the AC-3 standard of Dolby Laboratories Licensing Corporation or the MPEG (Motion Picture Experts Group) audio standard. In order for users to listen to the sound, a device is necessary which decodes these compressed sound data to original PCM data.
Since sound data is generally compressed by utilizing similarities between PCM data preceding/succeeding in time, a certain number of PCM data, that is, a plurality of PCM data within a certain time width, is collectively encoded. 256 pieces of the PCM data per channel are collectively encoded in the AC-3 standard, whereas 64 pieces per channel are collectively encoded in the MPEG audio standard. This means that 256 or 64 pieces of the PCM data are collectively obtained as a result of decoding. Here, all the PCM data which is collectively obtained is referred to as a "block".
In outputting the PCM data, a decoder generally outputs one piece of the PCM data per channel at a sampling period (1/32000, 1/44100, 1/48000 seconds and so on). This is because the decoder is in most cases directly connected to a D/A converter, requiring that the PCM data be supplied to the D/A converter when each piece of the PCM data is reproduced.
Therefore, the decoder has to output the PCM data of one block while decoding the PCM data of the next block.
FIG. 9 shows a structure of a conventional sound data decoder. As shown in FIG. 9, the sound data decoder includes: a compressed data input portion 1 performing serial/parallel conversion in response to compressed sound data serially transmitted bit by bit; a compressed data input buffer 3 connected to compressed data input portion 1 and having a random access memory (hereinafter referred to as a "RAM") inputting/outputting a word of 16 bits or 32 bits; a decode portion 5 connected to compressed data input buffer 3 and decoding by reading the compressed sound data of one block from compressed data input buffer 3; a PCM output buffer 7 connected to decode portion 5, having a storage capacity for storing two blocks of PCM data, and having a RAM inputting/outputting a word of a bit number corresponding to that of the PCM data; a PCM output portion 9 connected to PCM output buffer 7, reading one piece of the PCM data at a time from PCM output buffer 7, and performing parallel/serial conversion; and a control portion 11 instructing decode portion 5 to start decoding in response to reception of the compressed sound data of at least one block by compressed data input portion 1, and instructing PCM output portion 9 to start outputting the PCM data when decoding of the compressed sound data of one block is completed in decode portion 5.
Let us call a storage region holding one block of PCM data a "bank". Then, PCM output buffer 7 includes two banks 71, 72. When data is written to one bank by decode portion 5, data is read from the other bank by PCM output portion 9. When PCM output portion 9 finishes outputting all PCM data stored in one bank, decode portion 5 and PCM output portion 9 exchange respective banks 71, 72 to or from which data is written or read.
In a conventional sound data decoder structured as above, PCM output buffer 7 is required to have a storage capacity for holding two blocks of PCM data.
For example, decoded PCM data has a precision of 20 bits. In decoding the AC-3 standard data comprised of six channels (left, center, right, left surround, right surround, and Low Frequency Effect channels, of which the Low Frequency Effect channel is called a "super woofer" and it has an extremely narrow frequency band (deep bass), so that it is generally counted as 0.1 channels, storing one block of PCM data (256 pieces of data per channel.times.6 channels) requires (20 bits.times.256.times.6 channels=) 30720 bits or 3840 bytes. Therefore, 7680 bytes, or 2.times.3840 bytes, are required for the storage capacity of PCM output buffer 7.
Here, the technique for reducing a necessary storage capacity as a whole by dividing a storage region of a buffer memory to control writing and reading for each storage region is disclosed in Japanese Patent Laying-Open No. 2-285719. In this technique, one buffer memory is divided into three regions and two of which store sound data of one sector. When data reading from one region ends, writing the sound data of one sector is started for two regions other than the region which is to be read next.
More specifically, when time required from the start to the end of supplying external input data is represented by W, writing of one block to a buffer memory (requiring time W) is carried out such that it ends simultaneously with the end of the reproducing time period R of the last block. In short, writing of a block starts after time (R-W) since the start of reproducing of the last block. By reusing a region which has been already read out as part of the region to which data is to be written, the storage capacity necessary for the buffer memory is reduced as a whole.
However, if this technique is applied for decoding in the AC-3 standard having six channels, the results are as follows.
A block of data in the AC-3 standard has to be decoded successively for each channel, and a time required for decoding data is approximately the same for each channel. In short, when the time required for reproducing one block is R, data of one channel should be decoded within a time period R/6. Under this condition, data of one channel has to be decoded exactly in R/6 in order to suppress circuit size and power consumption of the decoder as much as possible. In such a decoder, data of one channel is supplied to the output buffer every time period R/6 after the start of decoding. In short, time W from the start to the end of supplying the external input data for one block is at least 5R/6. Therefore, the region which can be reused as a write region is such a region that reading is ended at time R-W (.ltoreq.R-5R/6=R/6), that is only 1/6 the region storing data of the last block at most.
If a sound data decoder is formed on one chip, however, the silicon area necessary for implementing a RAM for a PCM output buffer generally has considerable influence on manufacturing cost.